#include ".\drawer.h"

Drawer::Drawer(void)
: m_hdc(NULL)
{
}

Drawer::Drawer(HDC hdc)
{
	SetHdc(hdc);
}

Drawer::~Drawer(void)
{
}

void Drawer::SetHdc(HDC hdc)
{
	//assert(hdc != NULL);
	m_hdc = hdc;
}

BOOL Drawer::DrawBitmap( HBITMAP hBitmap, LPRECT lpRect, int nTopNotStretch /* = 0 */, int nBottomNotStretch /* = 0 */, int nLeftHNotStretch /* = 0 */, int nRightNotStretch /* = 0 */ )
{
	//assert(m_hdc != NULL);
	//assert(hBitmap != NULL);

	BITMAP bmpInfo = {0};
	int nRet = GetObject(hBitmap,sizeof(bmpInfo),&bmpInfo);
	//Get the information of the bitmap fail.
	if (0==nRet)
	{
		return FALSE;
	}

	//caculate 9 draw section.....

	return TRUE;
}

BOOL Drawer::DrawBitmap(
					   HBITMAP		hBitmap,
					   LPRECT		lprcDc,
					   LPRECT		lprcBitmap
					   )
{
	return TRUE;
}